package com.entrogy.timing;

import com.entrogy.bean.PassRecordEntity;
import com.entrogy.timing.StuRecordService;
import com.entrogy.utils.StrUtils;

public class StuRecordServiceTask implements Runnable{
    private StuRecordService stuRecordService = new StuRecordService();
    private PassRecordEntity passRecordEntity = null;

    public StuRecordServiceTask(PassRecordEntity passRecordEntity) {
        this.passRecordEntity = passRecordEntity;
    }

    @Override
    public void run() {
        int personThdid = 0;
        if(!StrUtils.isNullOrEmpty(passRecordEntity.getPersonId())){
            personThdid = Integer.parseInt(passRecordEntity.getPersonId());
        }
        stuRecordService.handleRecord(personThdid, passRecordEntity.getPersonName(), passRecordEntity.getDeviceName(), passRecordEntity.getIdentifyTs(), passRecordEntity.getDeviceId(),passRecordEntity.getVisitorPerIdNumber(),passRecordEntity.getSchoolCode());
    }
}
